Re: [go-nuts] Multiple processes in parallel for cgo service

2019-12-07 Thread Jake Montgomery
Nitish,

   I don't think you really explained the problem you are having. There is 
nothing in go that prevents you from running multiple instances of an 
executable, hence creating multiple processes running the same program. You 
can simply open two console windows and start the same long running go 
executable in each. So without more information your question seems like a 
trivial "yes".

   Of course. if your program (service) uses a shared resource, such as 
listening on a specific ip and port, then you could have a contention 
problem. But to solve that would require specifics of your service, and the 
problem you are having getting two of them to run at the same time. 

- Jake


On Saturday, December 7, 2019 at 9:34:19 AM UTC-5, Nitish Saboo wrote:
>
> Hi Brian,
>
> I understand by running the service as containers is one route through 
> which we can achieve this.
> My query is if I want to avoid that route , is there a way to achieve this 
> using Go code to define multiple instance and run them independently?
>
> Thanks,
> Nitish
>
> On Sat, Dec 7, 2019 at 1:52 AM Brian Candler  > wrote:
>
>> Can you just run multiple instances of your program, each independently 
>> fetching messages from SQS?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golan...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/36c64d89-c8bf-4595-8fc3-fdc11a8b315b%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/6cb9a724-83ce-4440-8458-3f50182e4cc9%40googlegroups.com.


Re: [go-nuts] Multiple processes in parallel for cgo service

2019-12-07 Thread Nitish Saboo
Hi Brian,

I understand by running the service as containers is one route through
which we can achieve this.
My query is if I want to avoid that route , is there a way to achieve this
using Go code to define multiple instance and run them independently?

Thanks,
Nitish

On Sat, Dec 7, 2019 at 1:52 AM Brian Candler  wrote:

> Can you just run multiple instances of your program, each independently
> fetching messages from SQS?
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/36c64d89-c8bf-4595-8fc3-fdc11a8b315b%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CALjMrq45tbeLzfkaA2PrtGw78C46d39iuFsrv6mGiXt8Q9EQ_A%40mail.gmail.com.


Re: [go-nuts] Multiple processes in parallel for cgo service

2019-12-06 Thread Brian Candler
Can you just run multiple instances of your program, each independently 
fetching messages from SQS?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/36c64d89-c8bf-4595-8fc3-fdc11a8b315b%40googlegroups.com.


Re: [go-nuts] Multiple processes in parallel for cgo service

2019-12-06 Thread Nitish Saboo
Hi Ian,

The Go code fetches a message from SQS and calls the C code to parse the
log messages.So this is what the cgo service does.
I would like to run the same service on different processes independently.
I am not sure how to achieve this in Go. Can you please guide me here.

Thanks,
Nitish

On Fri, Dec 6, 2019 at 11:11 AM Ian Lance Taylor  wrote:

> On Thu, Dec 5, 2019 at 2:41 AM Nitish Saboo 
> wrote:
> >
> > I am having a cgo(go + c) service.Is it possible to run multiple
> processes of the same service in parallel ?
>
> Well, it depends on what the service does.  But there is nothing in
> the Go tools or standard library that prevents you from doing this.
>
> Ian
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CALjMrq4iazJYAraoAdiG%3D%3D1-4uWd03jLGbs00FmDhuOt%3Dix0ig%40mail.gmail.com.


Re: [go-nuts] Multiple processes in parallel for cgo service

2019-12-05 Thread Ian Lance Taylor
On Thu, Dec 5, 2019 at 2:41 AM Nitish Saboo  wrote:
>
> I am having a cgo(go + c) service.Is it possible to run multiple processes of 
> the same service in parallel ?

Well, it depends on what the service does.  But there is nothing in
the Go tools or standard library that prevents you from doing this.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcWYW0UGqs-2Xut7En-7otjf6uN9exJdsyAWQU1ua5itUQ%40mail.gmail.com.


[go-nuts] Multiple processes in parallel for cgo service

2019-12-05 Thread Nitish Saboo
Hi,

I am having a cgo(go + c) service.Is it possible to run multiple processes 
of the same service in parallel ?

Thanks,
Nitish

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/7d4f24d2-bacc-44f0-9062-7b1f3be65e2d%40googlegroups.com.