Open amccaskey opened 7 years ago
I'm gonna do something similar to what I've done before - an INetworkingTool interface with get and post methods, and an AsioNetworkingTool implementation that uses boost asio which is header-only.
If you want, I'm fine with just starting with your networking tool code. I always thought it was nice code. (I'll give it a peek again though in case I see anything to complain about. ;-))
The only things that I immediately noticed with that code that are problematic are: 1) It uses some MOOSE-specific stuff. 2) It sits in the std namespace.
2 brings up an important point. Where would this sit in Fire? I would say we need to go ahead and create a util module and sub-namespace so that we have fire::util::INetworkingTool, for example. What do you think?
I just made that repo so that I could save the files - I found them on my hard drive and didn't want to lose them or dig through MOOSE' commit logs
I'm going to overhaul them and put them in Fire.
I was going to make an http directory, or util works too.
It will be in the fire namespace. moose didn't use namespaces :/
Yeah, let's make it util instead of http. We might do more than http in there.
I guess we could say MOOSE is free-range? Har har.
Joking aside, what do you think about putting it in a fire::util namespace instead of the main fire namespace?
I'm cool with that
Does that mean you want it to be fire::tensor::Tensor instead of fire::Tensor
Same for other directories?
No, some of the directories can't do that because of their templates and design. Explicit instantiation requires being in the same namespace for example.
So that's where I've kind of been drawing the line: things in Fire that people will extend, implement or specialize should be in the fire namespace. Specific, concrete, or final things should go in their own.
jm2c. Happy to reconsider.
Specifically in the case of fire::Tensor, I think it is fine.
I wrote a lot of this code last night.
New question: Any good suggestions on how to test it?
First thought was boost python to kick off a python http server that listens for posts.
That's a good option. I was going to suggest Mongoose instead, but it is released under the GPLv2 and I don't want to risk license pollution, even if they are only tests. Here's an interesting one though that is built on Asio:
https://github.com/eidheim/Simple-Web-Server
Jay Jay Billings Team Lead, Scientific Software Development Oak Ridge National Laboratory Twitter Handle: @jayjaybillings
From: Alex McCaskey notifications@github.com Sent: Friday, May 26, 2017 9:33 AM To: jayjaybillings/fire Cc: Billings, Jay Jay; Comment Subject: Re: [jayjaybillings/fire] Add HTTP networking tool (#17)
I wrote a lot of this code last night.
New question: Any good suggestions on how to test it?
First thought was boost python to kick off a python http server that listens for posts.
- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/jayjaybillings/fire/issues/17#issuecomment-304283655, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGFVYWQ1DN-97KdbDzoCf26fFjnSvidYks5r9tTEgaJpZM4Nm4Ta.
Cool, that looks awesome. I'll use that.
We need a tool that lets us execute HTTP GET and POST commands. We need this for real-time updates from simulations to ICE. We also need this for XACC Rigetti QPU support.