EzDevInfo.com

gateway interview questions

Top gateway frequently asked interview questions

Increasing 504 timeout error

Is there any way I can make the error 504 gateway timeout longer if so how and where is the file to change it located. I am using nginx on centos 6


Source: (StackOverflow)

How to increase page timeout to prevent 504 error?

I am running a file with considerable amount of code and have to process it for 1000 users. It takes approximately 55 seconds to process 500 users, so I have to increase the default gateway timeout time.

From this question, I found that I have to increase fastcgi_read_timeout, but I don't know where to put it in fastcgi.conf.


Source: (StackOverflow)

Advertisements

SMS Application [closed]

I just wanted to know is there any free sms gateway for sending SMS. If there is one, how to go on to developing my free sms service/software?

Any guidelines please.


Source: (StackOverflow)

Android as an SMS Gateway for integration with Web Application? [closed]

I currently have a web application which requires sending of SMS to other mobile phones.

I'm looking to connect my android phone to the server and invoke the SMS function to send a sms message out whenever the user clicks on "send" button on the web application

Is there any application that can do this?


Source: (StackOverflow)

What differents between Master node gateway and other node gateway in elasticsearch? Both of them store meta data, isn't it?

What differents between Master node gateway and other node gateway in elasticsearch? Both of them store meta data, isn't it? Meta data, elasticsearch called, what information we can get from it? The question may be so simple, but I am a rookie in elasticsearch. :)


Source: (StackOverflow)

NserviceBus Gateway Sample

Has anyone managed to get the NServiceBus Gateway component to work? The sample in v3.0 does not work out of the box like other samples.

A step by step guide or code sample will be helpful to get this component working.

Thanks


Source: (StackOverflow)

what's distinction of HTTP proxy, tunnel, gateway? [closed]

all, I see the terms from RFC 2616. http://www.w3.org/Protocols/rfc2616/rfc2616-sec1.html#sec1

But I can't understand the distinction of the proxy, tunnel and gateway? Can anyone give me a simple explanation of them?

Thanks.


Source: (StackOverflow)

Get current orderId in magento payment module during checkout

I am implementing my own payment module for Magento, where I implemented getCheckoutRedirectUrl() method in my payment model.

class My_Module_Model_Payment extends Mage_Payment_Model_Method_Abstract {}

This method is supposed to just return URL of payment gateway where user is redirected to, but I should also append current orderId to this URL.

The problem is am not able to get orderId. I tried solution as already accepted here

$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();

but I get empty $orderId. So this doesn't seem to work in my method. The call doesn't produce error, so I get an object (for example Mage::getSingleton('checkout/session')->getQuote()->getSubtotal() returns order amount), but orderId is empty.

I also tried:

$order = Mage::getModel('sales/order');
$order->load(Mage::getSingleton('sales/order')->getLastOrderId());
$orderId = $order->getIncrementId();

which again returns empty $orderId.

Any Ideas?


Source: (StackOverflow)

Is there a name for this pattern?

I am basically quite sure this pattern must exist and possess a name... for now I will call it "gate pattern"...

Here it is:

In my webpage's javascript, I have to trigger various asynchronous processes. Let's not discuss how trully async js is, but anyway I have to trigger 2 or 3 AJAX calls, must be sure, the UI build-up has finished, and so on.

Only then, when all these processes have finished, I want to do run a certain function. And precisely once.

Example

1: cropStore loaded()
2: resizeEvent()
3: productStore loaded()

The Pattern: At the end of every (sucessful) Ajax-load-callback, the end of the GUI construction routine, etc... I set a respective flag from false to true and call gatedAction()

onEvent( 'load',
{
   ....  // whatever has to happen in response to cropStored, resized, etc...
   // lastly:
   f1 = true; //resp f2, f3, ...
   gatedAction();
}

Gate will check the flags, return if any flag is still unset, only calling the target function, if all flags (or as I call them: gates) are open. If all my async pre-conditions call gatedAction() exactly once, I hope I can be sure, the actual targetFunction is called exactly once().

gatedAction ()
{
   // Gate
   if ( ! f1) return;
   if ( ! f2) return;
   if ( ! f3) return;

   // actual Action ( <=> f1==f2==f3==true )
   targetFunction();
}

In practice it works reliably. On a side-note: I think java-typical (not js-typical) synchronization/volatile concerns can be ignored, because javascript is not truly multithreading. Afaik a function is never stopped in the middle of it, just to grant another javascript function in the same document run-time...

So, anyone, is there a name for this? :-)

I need this pattern actually quite often, especially with complex backend UIs.. (and yes, I think, I will turn the above butt-ugly implementation into a more reusable javascript... With a gates array and a target function.)


Source: (StackOverflow)

how to use ccavenue payment gateway in asp.net

I have to implement ccavenue payment gateway in asp.net.

I have searched lot on the internet but not able to find single working example with asp.net.

I have tried example from site also but it is not documented and not proper . I have no idea about how to use this service with asp.net .


Source: (StackOverflow)

"Hg to Hg (Gateway) to SVN" compared to "Git to Git (Gateway) to SVN"

Question is similar to this (unanswered) and this one (same problem not involving Git).

The goal is to make Hg a front end for SVN for a period of time before transitioning fully to Hg.

The setup should probably look like the one depicted below (same as in the questions referenced above), however I'm not sure about the exact topology of intermediate Hg repositories.

Dev1 Hg --> Hg <--> SVN
Dev2 Hg -/

I know that the above setup works with git and git-svn as described in this comment:

Dev1 Git --> Git (bare) <--> Git (bridge) <--> SVN
Dev2 Git -/

Setup:

  1. Either git svn init, or git svn clone the SVN repo. This then becomes the “Git/SVN Bridge.”

  2. Fix up any of the branches, tags, etc… here. The svn/* refs are considered remotes, so if you want tracking branches, check these remotes out and create appropriate local branches. Also, check the tags out, and create actual tags. You MUST create local branches for any SVN branches that you wish to synchronize between Git and SVN.

  3. Now, create a new bare repository (git init) somewhere, and from the bridge, push all the branches to the bare repo (git push –tags).

  4. All Git users now clone this bare repository. The bridge will only be maintained by one (or a few) people that understand how to synchronize Git and SVN.

To update SVN trunk with changes on master, and vice-versa, from the bridge:

  1. git svn fetch (get new SVN changes)

  2. git checkout master

  3. git pull master (get Git changes from bare repo)

  4. git checkout svn/trunk (checkout detached head)

  5. git merge –no-ff –log master (merge changes from master). –no-ff insures an actual commit, –log copies individual log messages from each commit on master (–log is optional). git commit –amend can then be run if you want to edit the commit message.

  6. git svn dcommit (This pushes your merge commit to SVN. Note that the commit was on a detached head, and is no longer accessible). All of your work on master (since the merge-base of master and svn/trunk) gets committed as a single change, and is now available to SVN users.

  7. git checkout master

  8. git merge svn/trunk (Gets the new updates from SVN – with the altered commit message – and merges to master)

  9. git push barerepo (makes the SVN changes available to Git users)

What I don't know is if it's possible to somehow replicate the above on Hg. As I see it (I'm an intermediate Git user and know basics of working with Hg), the obstacles in Hg are:

  • no remote-tracking branches (is this possible with bookmarks? separate cloned repos?)
  • impossible to push merge commits via hgsubversion (step n. 6 in the above list. What stops hgsubversion from doing what svn dcommit does?)

Is it possible to make the Hg-SVN gateway work in the same fashion the Git-SVN gateway works? If no, why?


Source: (StackOverflow)

ip_conntrack_tcp_timeout_established not applied to entire subnet

I've got a nat setup with thousands of devices connected to it. The gateway has its internet provided by eth0 and the devices on the LAN side connect to eth1 on the gateway.

I have the following setup with iptables:

/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT

eth1 is configured as follows:

    ip: 192.168.0.1
subnet: 255.255.0.0

Clients are assigned the ips 192.168.0.2 through 192.168.255.254.

In /etc/sysctl.conf I have the following setup for ip_conntrack_tcp_timeout_established

net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=1200

Because of the number of client devices that connect to this gateway I can't use the default 5 day timeout.

This seems to work well and have tested the setup with over 10000 client devices.

However, the issue I am seeing is that the tcp established timeout of 1200 is only being applied to devices in the ip range of 192.168.0.2 through 192.168.0.255. All devices with ips in the 192.168.1.x through 192.168.255.x range are still using the 5 day default timeout.

This is leaving way too many "ESTABLISHED" connections in the /proc/net/ip_conntrack table and it eventually fills up, even though they should be timing out within 20 minutes, they are showing that they will timeout in 5 days.

Obviously I am missing a setting somewhere or have something configured incorrectly.

Any suggestions?

Thanks


Source: (StackOverflow)

How to design a RESTful HTTP gateway for a protocol that requires persistent connections?

I'm working with a persistent client/server protocol and I need to design a RESTful gateway. I don't have a lot of experience designing REST interfaces and I don't understand how I should handle (in a RESTful way) the session IDs needed to maintain persistent connections on the server and how I should represent server state as resources.

I'm asking this because I don't want to end-up with a RPC-ish result that looks "RESTful".

Problem specific context: I want to improve the existing ZooKeeper REST gateway to support ephemeral nodes and watches. An ephemeral node exists while the client is connected to the server.

Thanks.


Source: (StackOverflow)

Free to use api to access an sms gateway [closed]

Im a php developer in need of a free service that offers an api that enables me to send one of my users a simple text message.

I have a web app that allows you to receive updates (through sms), much like facebook or twitter when something new happens you get a text message updating you.

I dont want to pay to use a service like this in any way. i would display a warning to the user that once they sign up for the updates that standard text messaging rates may apply... cool.

i am aware of using phps mail function with the mobile users number plus the service providers text gateway address. also i know of some cheep alternatives but im not looking to spend money.

i just need to know of a service that offers me an api free of charge so i can send simple updates. (without adding adverts would be amazing also)

if anybody could help me out with this i would be grateful, thanks!


Source: (StackOverflow)

Writing USSD client OR USSD Open Source/To be purchased Client

My question is that is there any software/tool/library that is open source (ideally) or to be purchased, that I can u use to send and receive USSD messages? I would like that tool/library/software to connect to USSD gateway from my server and then send and receive messages for me. I just want to focus in writing the business logic of my application and nothing else. Its just like I am searching for a software/tool/library like Kannel (for SMS).

If theres no such tool/library/software then what needs to be done at client side to be able to effectively handle huge traffic while communicating with multiple USSD gateways?

I hope my question is clear!

Look forward to your answer


Source: (StackOverflow)