Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

Shaggar posted:

thats part of tomcat and not tc-server specific

tc-server's is much nicer than bog standard tomcat

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006
what does it add?

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

Shaggar posted:

what does it add?

http://www.springsource.com/developer/tcserver

but the part i was referring to was their command line app. deploying a new war is basically selecting a war and hitting enter instead of copying the war to some staging directory on the same disk and doing a mv so you don't accidentally deploy a partial

Shaggar
Apr 26, 2006
yeah that uses a web "service" thing thats built in to tomcat. you can do the same thing via the management servlet if you have it installed or via a command line tool that u can get from apache. also theres a tomcat deployment pluging for maven that uses the same service

i've never actually deployed a war directly to the webapps folder

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.
i don't think the tc server version uses the same mechanism as the built-in manager app, or the ant tasks, but i could be mistaken. either way it's nice, i hate the manager app and not all the apps i've deployed were mavenized

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
now I never did any large-scale servlet stuff so forgive my ignorance but are y'all talkin about different tools to use to copy a file?

multigl
Nov 22, 2005

"Who's cool and has two thumbs? This guy!"
Percona is fine, it's too bad there still isn't an equivalent of pgbouncer for MySQL that's as good though.

Shaggar
Apr 26, 2006
it looks like theres some cool stuff with monitoring, but alot of the "differences" are things that arent configured by default in tomcat (ex: jmx) or UIs for config files.

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

rotor posted:

now I never did any large-scale servlet stuff so forgive my ignorance but are y'all talkin about different tools to use to copy a file?

if you hot deploy, tomcat isn't smart enough to notice if a war file is not complete, so if you drop a file into the container in a non-atomic way, tomcat will attempt to explode it even tho it's not complete, so at least in a linux you have to copy the war to a place on the same disk, then `mv` the thing into webapps so that it's an atomic op

or you can use one of many other ways, but essentially yes this is all about putting a file in a place

Shaggar
Apr 26, 2006

rotor posted:

now I never did any large-scale servlet stuff so forgive my ignorance but are y'all talkin about different tools to use to copy a file?

if you just copy a war up to the webapps folder theres a chance that tomcat will try to unpack the war before you finish copying it which can lead to probs. thats where theres a deployment system build in where you push the war to a url and tomcat waits until its got the whole thing before unpacking. it can also respond with the results of the deployment and startup (ex: it unpacked but couldnt start cause ur missing a jar) so its alot nicer than a dumb file copy.

Shaggar
Apr 26, 2006
on windows im pretty sure that the copy will maintain a write lock that tomcat cant violate though so ur probably safe doing it on windows. but then you also have to deal w/ certain other lock issues in windows when doing undeploy/redeploys but theres a tomcat param to fix that.

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

Shaggar posted:

it looks like theres some cool stuff with monitoring, but alot of the "differences" are things that arent configured by default in tomcat (ex: jmx) or UIs for config files.

ya the instrumentation is good, use it with STS (hotrod eclipse) and spring insight and vfabric you can see all sorts of cool poo poo in realtime

vfabric is god drat expensive tho

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
GlassFish supremacy you plebs

Sapozhnik
Jan 2, 2005

Nap Ghost
I can't get the tomcat admin app to work on my live server lol. and i don't particularly want to risk extended downtime by loving around with it right now. it's some class path poo poo (needs a special class loader to gain super admin powers and the option that says it enables that doesn't actually seem to enable it)

so I just push things using SCP/mv like a big god drat idiot

deployment over HTTPS to an admin web service would be p sw8 tho.

Sapozhnik
Jan 2, 2005

Nap Ghost
Currently looking at maybe throwing ZeroMQ into the mix so that I can have a middle tier (i have two HTTP things, wanna add a middle tier to do caching and pub/sub between them).

ZeroMQ looks really nice but the ~hilariously zany~ documentation is kind of annoying. "hello sir can i interest you in building your business on top of a middleware package that was written by a gigantic man child?"

does anyone have any experience with it?

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.
why use zero and not rabbit? rabbit is good and erlang and poo poo

Meiwaku
Jan 10, 2011

Fun for the whole family!

trex eaterofcadrs posted:

erlang and poo poo

Q.E.D.

jony neuemonic
Nov 13, 2009

is head first c any good? i don't really plan on learning c any time soon, but it's on sale and it might be a nice distraction from the semi-colon hell of javascript

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

fidel sarcastro posted:

is head first c any good? i don't really plan on learning c any time soon, but it's on sale and it might be a nice distraction from the semi-colon hell of javascript

if you're itching to spend money and learn C get K&R
http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/0131103628/ref=sr_1_1?ie=UTF8&qid=1343489787&sr=8-1&keywords=k+r+c+programming

CaptainMeatpants
Jun 1, 2010


even if you never use C in your life you will still learn useful things from this book

CaptainMeatpants
Jun 1, 2010

5.3.0 Prior versions treated arrays as the string Array, thus returning a string length of 5 and emitting an E_NOTICE level error.

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

CaptainMeatpants posted:

5.3.0 Prior versions treated arrays as the string Array, thus returning a string length of 5 and emitting an E_NOTICE level error.

haha

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
learning programming languages is cool and awesome

homercles
Feb 14, 2010

Mr Dog posted:

Currently looking at maybe throwing ZeroMQ into the mix so that I can have a middle tier (i have two HTTP things, wanna add a middle tier to do caching and pub/sub between them).

ZeroMQ looks really nice but the ~hilariously zany~ documentation is kind of annoying. "hello sir can i interest you in building your business on top of a middleware package that was written by a gigantic man child?"

does anyone have any experience with it?
The docs certainly are rather zany, I dont have any experience with v3 only worked with the v2 API, the parts where they breaks down REQ/REP into asinine moma/papa sockets along with the associated ridiculous analogies gets old very, very quickly.

In the end I just went with ROUTER and DEALER sockets (I have no use for multicast or a pub/sub model in my app) and completely ignored the rest (I had no need for PUB/SUB), REQ/REP are nice in theory but the rules that govern what can talk to what (http://zguide.zeromq.org/page:all#Core-Messaging-Patterns) can seem constricting if you try to build a complex app using every bloody socket type possible. Further the behavior of ROUTER and DEALER with regard to how how they manipulate frames in a message to perform message routing are super simple.

It's nice that ZeroMQ handles connection, reconnection on dropout, does it in an asynchronous manner and has internal buffer support. If you want guaranteed message delivery you have to bake that into your own protocol. They have a whole bunch of recipes provided for guaranteeing delivery, synchronisation between workers etc but once you get a feel for how ROUTER/DEALER work building a solution will come naturally (just don't feel the need to mix in the umpteen other socket variants just because you can).

One bugbear I had (and I don't know if they are addressing this in v3, I think so?) is that you don't get any notification of whether a ZeroMQ socket is up. In a lot of cases you won't get any notification on raw tcp since an endpoint can turn into a black hole, but some introspection of ZeroMQ's internal state would be nice (whether a ROUTER/DEALER is connected [it's not as simple as that since both can have multiple connections]). What you end up doing to get around that is baking your own heartbeat functionality into your app.

So yeah, I haven't worked with RabbitMQ. ZeroMQ was ok if you avoid all the extra duplicate poo poo it has to offer (ie REQ/REP are implemented in terms of ROUTER/DEALER, but due to weird msg frame fuckery only req can talk to dealer and only rep can talk to router there's a good reason for it but really who cares).

Also, ZeroMQ was forked into Crossroads I/O by some core devs (it's still zeromq but with all the functions renamed) because they disliked the community development model, I don't know which of these projects will win out, ZeroMQ has a much higher mailing list volume.

Nomnom Cookie
Aug 30, 2009



homercles posted:

The docs certainly are rather zany, I dont have any experience with v3 only worked with the v2 API, the parts where they breaks down REQ/REP into asinine moma/papa sockets along with the associated ridiculous analogies gets old very, very quickly.

In the end I just went with ROUTER and DEALER sockets (I have no use for multicast or a pub/sub model in my app) and completely ignored the rest (I had no need for PUB/SUB), REQ/REP are nice in theory but the rules that govern what can talk to what (http://zguide.zeromq.org/page:all#Core-Messaging-Patterns) can seem constricting if you try to build a complex app using every bloody socket type possible. Further the behavior of ROUTER and DEALER with regard to how how they manipulate frames in a message to perform message routing are super simple.

It's nice that ZeroMQ handles connection, reconnection on dropout, does it in an asynchronous manner and has internal buffer support. If you want guaranteed message delivery you have to bake that into your own protocol. They have a whole bunch of recipes provided for guaranteeing delivery, synchronisation between workers etc but once you get a feel for how ROUTER/DEALER work building a solution will come naturally (just don't feel the need to mix in the umpteen other socket variants just because you can).

One bugbear I had (and I don't know if they are addressing this in v3, I think so?) is that you don't get any notification of whether a ZeroMQ socket is up. In a lot of cases you won't get any notification on raw tcp since an endpoint can turn into a black hole, but some introspection of ZeroMQ's internal state would be nice (whether a ROUTER/DEALER is connected [it's not as simple as that since both can have multiple connections]). What you end up doing to get around that is baking your own heartbeat functionality into your app.

So yeah, I haven't worked with RabbitMQ. ZeroMQ was ok if you avoid all the extra duplicate poo poo it has to offer (ie REQ/REP are implemented in terms of ROUTER/DEALER, but due to weird msg frame fuckery only req can talk to dealer and only rep can talk to router there's a good reason for it but really who cares).

Also, ZeroMQ was forked into Crossroads I/O by some core devs (it's still zeromq but with all the functions renamed) because they disliked the community development model, I don't know which of these projects will win out, ZeroMQ has a much higher mailing list volume.

this sounds like zookeeper with less features

tef
May 30, 2004

-> some l-system crap ->

homercles posted:

the parts where they breaks down REQ/REP into asinine moma/papa sockets along with the associated ridiculous analogies gets old very, very quickly.

“The use of anthropomorphic terminology when dealing with computing systems is a symptom of professional immaturity.”

:smug:

quote:

In the end I just went with ROUTER and DEALER sockets, I have no use for multicast or a pub/sub model in my app.

So what would be wrong with tcp or udp? :confused:

quote:

It's nice that ZeroMQ handles connection, reconnection on dropout, [... but] you don't get any notification of whether a ZeroMQ socket is up.

It handles reconnection except when it doesn't? :confused:

quote:

If you want guaranteed message delivery you have to bake that into your own protocol. [...]What you end up doing to get around that is baking your own heartbeat functionality into your app.

The feeling I get is that 0mq solves problems you don't have in return for making the problems you do have, harder. A framework in search of a protocol.

tef
May 30, 2004

-> some l-system crap ->
i've been poking at 0mq trying to work out why it smells weird to me, and I think I know why.

0mq doesn't smell like a messaging library, It smells like a selection of magic unix pipes.

0mq feels more about data flow than IPC, because message behaviour is defined by the properties of the pipe, rather than by properties of the messages. 0mq messages are opaque blobs.

i can imagine making something like a bash script run hog wild over 0mq.

for message passing/ipc, something like 0mq doesn't really help you more than bare tcp. you still have to define your message serialisation, error handling, and middleware.

homercles
Feb 14, 2010

tef posted:

So what would be wrong with tcp or udp? :confused:
In app design you have to deal with some or all of the problems below:
  • designing a wire-level protocol for encoding your messages (this is the simplest of your problems)
  • deciding on language-specific communications frameworks (eg for java, are you going with lots of threads+synchronous java.io.socket comms or with netty or something else entirely). If you're building a model which has multiple languages using the same wire-level protocol then 0MQ offers a common API
  • navigating OS-specific vagaries and implementation gotchas (that is, if your language framework does not address them). If they exists, 0MQ abstracts them away
  • dealing with the additional development time required to build up your client server connection model that handles network errors, internal buffering of messages above and beyond OS-level socket buffers, and designing a neutral API without loving it up for future maintenance
  • planning for future scalability. 0MQ exposes cross-thread, cross-process and cross-machine comms with an identical interface. if you use it in the way it's designed then you get future scalability almost for free, (same I guess with tcp) but some may be tempted to hard-code their app using shared memory and locking for threads, the various shared memory mechanisms on inter-process etc

Put more simply, it takes a lot of poo poo work you have to do that's different for each language/architecture and instead gives you a common lovely interface.

tef posted:

It handles reconnection except when it doesn't? :confused:
Well take tcp, if whatever you're connected to starts throwing icmp dest unreachables at you your app is notified quickly. If however whatever you're talking to hangs, machine has a hardware failure etc it could take minutes before you're app is told the socket is gone.

For the situations in tcp where you're getting icmp messages it would be nice to have that immediate "this endpoint is hosed" notification in 0MQ, but ultimately in both your custom framework or 0MQ you're going to have to bake in your own health checks for the times when the endpoint turns into a black hole.

tef posted:

The feeling I get is that 0mq solves problems you don't have in return for making the problems you do have, harder. A framework in search of a protocol.
I don't disagree with any of the main bulleted selling points on https://www.zeromq.org. A lot of the selling points don't strongly apply to my problems but they're still nice to have.

[e] my written prose is just the worst

homercles fucked around with this message at 07:47 on Jul 30, 2012

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

homercles posted:

In app design you have to deal with some or all of the problems below:
  • designing a wire-level protocol for encoding your messages (this is the simplest of your problems)
  • deciding on language-specific communications frameworks (eg for java, are you going with lots of threads+synchronous java.io.socket comms or with netty or something else entirely). If you're building a model which has multiple languages using the same wire-level protocol then 0MQ offers a common API
  • navigating OS-specific vagaries and implementation gotchas (that is, if your language framework does not address them). If they exists, 0MQ abstracts them away
  • dealing with the additional development time required to build up your client server connection model that handles network errors, internal buffering of messages above and beyond OS-level socket buffers, and designing a neutral API without loving it up for future maintenance
  • planning for future scalability. 0MQ exposes cross-thread, cross-process and cross-machine comms with an identical interface. if you use it in the way it's designed then you get future scalability almost for free, (same I guess with tcp) but some may be tempted to hard-code their app using shared memory and locking for threads, the various shared memory mechanisms on inter-process etc
just use http and rest hth

Sapozhnik
Jan 2, 2005

Nap Ghost
pub-sub doesn't really map well to rest

Zombywuf
Mar 29, 2008

Mr Dog posted:

pub-sub doesn't really map well to rest

Pubsubhubbub

Or just do REST over SMTP, there's nothing in REST that says you have to use HTTP.

tef
May 30, 2004

-> some l-system crap ->

Mr Dog posted:

pub-sub doesn't really map well to rest

:qq:

Shaggar
Apr 26, 2006
just use soap

Zombywuf
Mar 29, 2008

Enough about your personal hygiene, we're talking about grown up stuff.

tef
May 30, 2004

-> some l-system crap ->

homercles posted:

In app design you have to deal with some or all of the problems below:[list][*] designing a wire-level protocol for encoding your messages (this is the simplest of your problems)

Put more simply, it takes a lot of poo poo work you have to do that's different for each language/architecture and instead gives you a common lovely interface.

thing is, if you're doing rpc/ipc you might as well use an rpc/ipc library. They actually handle that problem.

you can roll your own in 0mq, sure, but really, there are other options out there. HTTP makes a decent request-response protocol, and there is a poo poo ton of library support for it. if you use a good one, you can take advantage of http caches and load balancers.

also I have no idea how 0mq makes things 'scalable'. scaling an application is m often an operations problem, more than an implementation problem.


Mr Dog posted:

pub-sub doesn't really map well to rest

here's a nickel kid, get yourself a real architecture

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
just use http. put what you want to send back in a json. done.

syntaxrigger
Jul 7, 2011

Actually you owe me 6! But who's countin?

Jonny 290 posted:

seems like there are a few dece scraping gigs that i can underbid a bit but that'd just be for beer money. idk

so far i havent found an open source project that i both care about and could meaningfully bugfix/contribute to and i got bout 12-18 months to have a portfolio that i am comfortable handing to companies

if you find an interesting open source project let me know jonny

i think we are in similar boats

Zizzyx
Sep 18, 2007

INTERGALACTIC CAN CHAMPION

i doubt it. your boat is sinking

syntaxrigger
Jul 7, 2011

Actually you owe me 6! But who's countin?

Adbot
ADBOT LOVES YOU

coaxmetal
Oct 21, 2010

I flamed me own dad
I was complaining about someone who had done this (returning a pointer to a function's stack) and someone in irc linked me this

http://www.functionx.com/cpp/examples/returnpointer.htm

fukken shameful.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply